package com.tem.payment.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 在线支付历史记录,非在线支付，不会保存到该模块
 * </p>
 *
 * @author 腾木
 * @since 2023-11-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("payment_history")
@ApiModel(value="PaymentHistory对象", description="在线支付历史记录,非在线支付，不会保存到该模块")
public class PaymentHistory implements Serializable {

    private static final long serialVersionUID=135677980234L;

    @ApiModelProperty(value = "支付历史 -- 升级放到mongoDB")
    @TableId(value = "payment_history_id", type = IdType.AUTO)
    private Long paymentHistoryId;

    @ApiModelProperty(value = "部门 或 店铺")
    @TableField("sys_branch_office_id")
    private Long sysBranchOfficeId;

    @ApiModelProperty(value = "支付方式id")
    @TableField("payment_method_id")
    private Long paymentMethodId;

    @ApiModelProperty(value = "账户,方法,金额")
    @TableField("pay_message")
    private String payMessage;

    @ApiModelProperty(value = "订单编码")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "支付金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "支付报错回款信息")
    @TableField("error_message")
    private String errorMessage;

    @ApiModelProperty(value = "支付报错状态码")
    @TableField("error_code")
    private String errorCode;

    @ApiModelProperty(value = "支付状态返回信息")
    @TableField("receive_data")
    private String receiveData;

    @ApiModelProperty(value = "收款账号编码")
    @TableField("sk_numb")
    private String skNumb;

    @ApiModelProperty(value = "平台 1手机 2pc电脑 3线下支付")
    @TableField("is_from")
    private Integer isFrom;

    @ApiModelProperty(value = "支付时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "支付客户端ip")
    @TableField("remote_ip")
    private String remoteIp;

    @ApiModelProperty(value = "支付状态 1成功 0失败 2已退款")
    @TableField("flag")
    private Integer flag;

    @TableField("deleted")
    @TableLogic
    private Integer deleted;


}
